#pragma once
#include "stdafx.h"
#include "Element.h"
#include "IStreamInput.h"
#include "JsonSchema.h"
#include <boost/asio.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/shared_ptr.hpp>
class SocketStreamInput:public IStreamInput
{
private:
	boost::asio::streambuf streambuffer;
	std::string ip;
	std::string port;
	void getNextElement(Element& element);
public:
	SocketStreamInput(std::string ip,std::string port,boost::shared_ptr<JsonSchema> schema);
	~SocketStreamInput(void);
	void readData(char* data, int length);
	bool isEmpty();
	void initial();
};

